﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AppearFeedBack.aspx.cs" Inherits="Flow_Info_AppearFeedBack" %>

<%@ Import Namespace="TarreOA.TarreOAModels" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <style type="text/css">
        <!--
        html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
        scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
        -->
    </style>
    <script type="text/javascript">
        function checkForm() {
            if (myFrm.content.value == "") {
                alert("请写下您的反馈意见！");
            } else {
                document.myFrm.submit();
            }
        }
        function submitForm() {
            if (event.ctrlKey & event.keyCode == 13) {
                checkForm();
            }
        }  
    </script>
</head>
<body>
    <br />
    <form id="myFrm" name="myFrm" action="addFeedBack.aspx" method="post" onkeydown="submitForm()">
    <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0"
        style="border-collapse: collapse;">
        <tr bgcolor="#b1d5ef">
            <td align="center" height="30px">
                <b>我的反馈意见</b>
                <input type="hidden" name="ST_SO" value="<%= st_so %>" />
                <input type="hidden" name="AL_AF" value="<%= allow_affix %>" />
            </td>
        </tr>
        <tr bgcolor="#b1d5ef">
            <td align="center">
                <textarea id="content" name="content" cols="20" style="height: 88px; width: 99%"></textarea>
                <input type="hidden" name="WR_ID" value="<%=work_id %>" />
            </td>
        </tr>
        <tr bgcolor="#b1d5ef">
            <td align="center" onclick="checkForm()" style="height: 30px; cursor: pointer;">
                点击保存反馈<br />
                (您还可以ctrl+enter)
            </td>
        </tr>
        <% if ("yes".Equals(allow_affix) && st_so == 1)
           { %>
        <tr bgcolor="#b1d5ef">
            <td align="center" onclick="affixupload(<%= work_id %>)" style="height: 30px; cursor: pointer;">
                点击上传附件
            </td>
        </tr>
        <% } %>
        <asp:Repeater ID="affixfiledlist" runat="server">
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text='<%#Eval("afname") %>'></asp:Label>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("afid") %>'>下载</asp:HyperLink>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <script type="text/javascript">
        function affixupload(workid) {
            window.showModalDialog('flow_uploadaffixfile.aspx?WRID=' + workid, null, 'status:no;center:yes;scroll:no;resizable:no;help:no;dialogWidth:600px;dialogHeight:260px');
        }
    </script>
    </form>
    <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0"
        style="border-collapse: collapse;">
        <tr bgcolor="#b1d5ef">
            <td align="center" height="30px">
                <% if (list_feed == null)
                   { %>
                <b>无任何反馈意见</b>
                <% }
                   else
                   { %>
                <b>所有反馈意见</b>
                <% } %>
            </td>
        </tr>
        <% if (list_feed != null)
           { %>
        <% foreach (Flow_WorkFeedBack fwfb in list_feed)
           { %>
        <tr bgcolor="white">
            <td style="word-break: break-all">
                <%=fwfb.FeedBack_userName %>
                <br />
                [<%=fwfb.FeedBack_time.ToString() %>]<br />
                <%=fwfb.FeedBack_content %>
            </td>
        </tr>
        <% } %>
        <% } %>
    </table>
</body>
</html>
